<div id="content">
  <div class="row s_page_title">
    <sa-big-breadcrumbs [items]="['设备安装管理','维修管理V2','待解除限制记录']" icon="fa fa-wrench"
      class="col-xs-12 col-sm-7 col-md-7">
    </sa-big-breadcrumbs>
  </div>

  <sa-widgets-grid>
    <div class="s_table">
      <div sa-widget [editbutton]="false" color="darken" class="clearfix">
        <header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
          <h2>待解除限制记录</h2>
        </header>
        <div>
          <div class="widget-body no-padding">
            <div class="page-header clearfix s_table_opreation">
              <div class="left page-header-btn">
                <sa-company-tree-car title="厂区名称" companyTreeId="companyTree" (companySelected)="companySelected($event)">
                </sa-company-tree-car>
                <div class="selectDate top_module">
                  <table-select-date [notInit]='true' (outerTime)="getSelectTableTime($event)"></table-select-date>
                </div>
                <div class="top_module top_module_box" style="min-width: auto;">
                  <span class="top_module_label module_text">解除限制进厂状态</span>
                  <select name="limitStatus" class="top_module_select" [(ngModel)]="limitStatus" style="min-width: 110px;">
                    <option value="">全部</option>
                    <option :value="0">未解除</option>
                    <option :value="1">已解除</option>
                  </select>
                </div>
                <button class="btn btn-primary" (click)="table_search()">查询</button>
                <!-- <button class="btn btn-primary" (click)="exportTable()">导出</button> -->
              </div>
              <div class="right top-search" style="width: 280px;">
                <input type="text" [(ngModel)]="searchKey" (change)="table_search()" class="search-input"
                  placeholder="车牌号,设备ID">
                <span class="top-search-box">
                  <button class="top-search-btn" type="button" (click)="table_search()"> <i
                      class="fa fa-search"></i></button>
                </span>
              </div>
            </div>
            <div class="table_scroll">
              <table
                class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                <thead>
                  <tr>
                    <th>厂区名称</th>
                    <th>设备Id</th>
                    <th>车牌号码</th>
                    <th>公司名称</th>
                    <th>是否解除限制进厂状态</th>
                    <th>解除人</th>
                    <th>解除时间</th>
                    <!-- <th>待维修记录id</th>
                    <th>已维修记录id</th> -->
                    <th>创建人</th>
                    <th>创建时间</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tbody>
                  <tr *ngFor="let row of tableData">
                    <td>{{row.factoryName}}</td>
                    <td>{{row.deviceId}}</td>
                    <td>{{row.carNumber}}</td>
                    <td>{{row.companyName}}</td>
                    <td>
                      <span *ngIf="row.limitStatus === 0">未解除</span>
                      <span *ngIf="row.limitStatus === 1">已解除</span>
                    </td>
                    <td>{{row.limitUser}}</td>
                    <td>{{row.limitTime}}</td>
                    <!-- <td>{{row.repairedId}}</td>
                    <td>{{row.repairedV2Id}}</td> -->
                    <td>{{row.createUser}}</td>
                    <td>{{row.createTime}}</td>
                    <td>
                      <button type="button" (click)="deleteRecord(row)">删除</button>
                      <button *ngIf="row.limitStatus === 0" type="button" (click)="releaseRestrictions(row)">解除限制</button>
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
            <div class="table-fix clearfix">
              <paginator [totalRecords]="totalCount" [rows]="pageSize" [currentPage]="curPage - 1"
                (onPageChange)="paginate($event)">
              </paginator>
              <button type="button" class="btn default refresh_btn" (click)="refresh()"><i
                  class="fa fa-refresh"></i></button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </sa-widgets-grid>
</div>